﻿

using Feicui.BeautyCRM.DAL;
using Feicui.BeautyCRM.IDAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Feicui.BeautyCRM.Factory
{
    /// <summary>
    /// DbSession是唯一对外访问数据持久层的对象（拥有所有操作类的实例化对象）
    /// </summary>
    public partial class DbSession : IDbSession
    {
		
		/// <summary>
		/// 获取Beauty_Menu实例化的对象
		/// </summary>
		public IBeauty_MenuDal Beauty_MenuDal
		{
			get { return StaticDalFactory.GetIBeauty_MenuDal(); }
		}

			
		
		/// <summary>
		/// 获取Beauty_Role实例化的对象
		/// </summary>
		public IBeauty_RoleDal Beauty_RoleDal
		{
			get { return StaticDalFactory.GetIBeauty_RoleDal(); }
		}

			
		
		/// <summary>
		/// 获取Beauty_Transaction实例化的对象
		/// </summary>
		public IBeauty_TransactionDal Beauty_TransactionDal
		{
			get { return StaticDalFactory.GetIBeauty_TransactionDal(); }
		}

			
		
		/// <summary>
		/// 获取Beauty_User实例化的对象
		/// </summary>
		public IBeauty_UserDal Beauty_UserDal
		{
			get { return StaticDalFactory.GetIBeauty_UserDal(); }
		}

			
		
        /// <summary>
        /// 提交
        /// </summary>
        /// <returns></returns>
        public int SaveChanges()
        {
            return DbContextFactory.GetCurrentDbContext().SaveChanges();
        }
    }
}
